﻿using System.Collections.Generic;

namespace Model
{
    public class Post
    {
        public string postname;
        public string postcontent;
        public string posttime;
        public string postusername;
        public string postid;

        public Post(string pname, string pcontent, string ptime, string pusername)
        {
            postusername = pusername;
            postcontent = pcontent;
            postname = pname;
            posttime = ptime;
        }
        public Post(Dictionary<string, string> post)
        {
            this.postname = post["postname"].ToString();
            this.postcontent = post["postcontent"].ToString();
            this.posttime = post["postdate"].ToString();
            this.postusername = post["postuser"].ToString();
            this.postid = post["postid"].ToString();
        }
        public Post( string id,string pname, string pcontent, string ptime, string pusername)
        {
            postusername = pusername;
            postcontent = pcontent;
            postname = pname;
            posttime = ptime;
            postid = id;
        }
    }
}
